regular expression alphanumeric dash space c#

62

regular expression alphanumeric dash space c# -

var regexp = /^[a-zA-Z0-9-_]+$/;
var check = "checkme";
if (check.search(regexp) === -1)
    { alert('invalid'); }
else
    { alert('valid'); }

Comments

Submit
0 Comments